package tankgame05;

/**
 * @author 谷其昊
 * @version 1.0
 * @date 2022/2/18
 * @time 19:37
 */
public class Bomb {
    int x , y;
    /**
     * 炸弹的生命周期
     */
    int life = 9;

    /**
     * 炸弹是否存活
     */
    boolean isAlive = true;

    /**
     * 减少生命值
     */
    public void lifeDown(){
        if (life > 0){
            life -- ;
        }else{
            isAlive = false;
        }
    }

    public Bomb(int x, int y) {
        this.x = x;
        this.y = y;
    }
}
